var express = require('express');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var path = require('path');
var app = express();

global.conf = require('./conf');  // 配置文件

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());


require(path.join(conf.dir.controller, conf.exceptFolder))(app);

app.listen(8001, function (err) {
  if (err) {
    console.log(err)
    return;
  }
})

